public class CurrencyModel extends HCIModelAdapter
Java class represents a currency as a Java Currency container;
This class extends the java.lang.Currency by adding features to marshal the objects.
A currency is identified by its ISO 4217 currency code.
StringModel,
BooleanModel,
NumberModel,
DateModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="CurrencyType"> <xs:attribute name="value" type="xs:string"/> </xs:complexType>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The XML tag name of this data model: "currency"
|
| Constructor and Description |
|---|
CurrencyModel()
Constructs an empty currency model.
|
CurrencyModel(String value)
Constructs a currency model filled with the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getTagName()
Gets the XML tag name of the HCI model.
|
String |
getValue()
Gets the value of the currency.
|
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object.
|
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setValue(String value)
Sets the currency model value.
|
marshalpublic static final String TAG_NAME
public CurrencyModel()
public CurrencyModel(String value)
value - The value to store in this currency modelpublic String getValue()
public void setValue(String value)
value - The value to set up in this currency modelpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the child objects intopublic void addCharacterData(String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic String getTagName()
ITagNameProvider